pub fn convert_base(num_str: &str, to_base: u32) -> String {
    // 转换为十进制，由小到大逐级进位
    let number: Vec<&str> = vec!["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f"];
    let mut result = String::new();
    let mut remainder: u32 = 0;
    let mut div: u32 = 0;
    let mut m: u32 = 1;
    let mut mul_div: u32 = 1;
    let mut is_n = false;
    for s in num_str.chars().rev() {
        if s == ')' {
            continue;
        } else if s == '(' {
            is_n = true;
            continue;
        }
        if is_n {
            //增加余数
            remainder = remainder + mul_div * number.iter().position(|&x| x == s.to_string()).unwrap() as u32;
            //连续进位
            while remainder >= to_base {
                result = result + number[(remainder % to_base) as usize];
                remainder = remainder / to_base;
            }
            mul_div = mul_div * div;
        } else {
            // 计算进制数
            div = div + (s as u32 - 48) * m;
            m = m * 10;
        }
    }
    if remainder != 0 {
        result = result + number[(remainder % to_base) as usize];
    } //处理结尾余数
    result.chars().rev().collect()
}
